﻿using System;
using System.Collections.Generic;
using System.Text;

namespace DeepHash
{
    [HashAlgorithem("MD5")]
    public class MD5HashAlgorithem : IHashingAlgorithem
    {
        #region IHashingAlgorithem Members

        public byte[] GetHashValue(System.IO.Stream stream)
        {
            System.Security.Cryptography.MD5 md5 = new System.Security.Cryptography.MD5CryptoServiceProvider();
            byte[] result = md5.ComputeHash(stream);
            md5.Clear();
            return result;
        }

        public bool VerifyHash(System.IO.Stream stream, byte[] hashValue)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
